package assets 
{
	import com.dozen.mc.DUIBackground;
	import com.dozen.mc.DUIFarmland;
	import ui.fl.DUIBuildingEx;
	import vo.MOConfigVO;
	/**
	 * ...
	 * @author lgyu
	 */
	public class UIAsset 
	{
		static private var configs:Array = null
		
		public function UIAsset() 
		{
			
			
		}
		
		static public function getConfigVoByTypeId(typeId:int):MOConfigVO {
			if (!(configs != null && configs.length != 0)) {
				initConfigs()
			}
			var getConVo:MOConfigVO
			//trace(  1+ configs + ":"+ configs.length)
			for (var i:int = 0; i < configs.length; i++ ) {
				var moConVo = configs[i] as MOConfigVO
				if (moConVo) {
					//trace("moConVo.typeId:" +moConVo.typeId)
					if (moConVo.typeId== typeId) {
						getConVo = moConVo
						break;
					}
				}
			}
			
			return getConVo
		}
		
		static private function initConfigs():void 
		{
			var bg:MOConfigVO = new MOConfigVO
			bg.typeId = 100001
			bg.rotation = 0 
			bg.mask = "0099"
			var item1:MOConfigVO = new MOConfigVO
			item1.typeId = 200001
			item1.rotation = 0
			item1.mask = "0000"
			var item2:MOConfigVO = new MOConfigVO
			item2.typeId = 200002
			item2.rotation = 0
			item2.mask = "0000"
			var item3:MOConfigVO = new MOConfigVO
			item3.typeId = 200003
			item3.rotation = 0
			item3.mask = "0000"
			var item4:MOConfigVO = new MOConfigVO
			item4.typeId = 200004
			item4.rotation = 0
			item4.mask = "0000"
			var item5:MOConfigVO = new MOConfigVO
			item5.typeId = 200005
			item5.rotation = 0
			item5.mask = "0000"
			
			bg.url = DUIBackground
			item1.url = DUIFarmland
			item2.url = DUIFarmland
			item3.url = DUIFarmland
			item4.url = DUIFarmland
			item5.url = DUIFarmland
			configs = []
			configs = [bg, item1, item2 , item3, item4 , item5]
		}
		
		
	}

}